//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatopenUsers, WechatopenUsersResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatopenUsersList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatopenUsersResponse>(`/uctoo/wechatopen_users/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatopenUsers = async (id: string) => {
  return requestClient.get<WechatopenUsers>(`/uctoo/wechatopen_users/${id}`);
};

export const adductooWechatopenUsers = async (data: Partial<WechatopenUsers>) => {
  return requestClient.post<WechatopenUsers>('/uctoo/wechatopen_users/add', data);
};

export const edituctooWechatopenUsers = async (data: Partial<WechatopenUsers>) => {
  return requestClient.post<WechatopenUsers>('/uctoo/wechatopen_users/edit', data);
};

export const deleteuctooWechatopenUsers = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatopen_users/del', { id });
};
